<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>36k</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .wrap {
            margin: 0 auto;
            border:1px solid red;
            width: 300px;
            text-align: center;
        }
        button {
            width: 50px;
            height: 30px;
        }
        .tu {
            width: 300px;
            border:1px solid red;
        }
        img {
            width: 300px;
            height: 150px;
        }
    </style>
</head>
<body>
    <div class="wrap">
        <button onclick="anniu(1)">001</button>
        <button onclick="anniu(2)">002</button>
        <button onclick="anniu(3)">003</button>
        <div class="tu">
            <img src="img/da1.png" alt=""><p>我是第一张图片</p>
        </div>
    </div>
</body>
<script>
    var tu=document.querySelector(".tu");
    
    function anniu(n){
        var str="";
        if (n==1){
            str='<img src="img/da1.png" alt=""><p>我是第一张图片</p>';
        }
        if (n==2){
            str='<img src="img/da2.png" alt=""><p>第一张图ghg片我是</p>';
        }
        if (n==3){
            str='<img src="img/da3.png" alt=""><p>我是第dghdghdgfhdghdf一张图片</p>';
        }
        tu.innerHTML=str;
    }


    var f = function() {
        return true;
    }   
    var g = function() {
        return false;
    }   
    (function() {       
        if (g() && [] == ![]) {          
            f = function f() {
                return false;
            }        
            function g() {
                return true;
            }       
        } 
    })()  
    alert(f());


</script>







</html>